﻿<Tree ShowCheckbox="true" Items="@Items" OnTreeItemChecked="@OnTreeItemChecked" />
<BlockLogger @ref="TraceCheckedItems" class="mt-3" />

@code {
    [NotNull]
    private BlockLogger? TraceCheckedItems { get; set; }

    private List<TreeItem> Items { get; set; } = TreeDataFoo.GetTreeItems();

    private Task OnTreeItemChecked(List<TreeItem> items)
    {
        TraceCheckedItems.Log($"Currently selected {items.Count} item");
        return Task.CompletedTask;
    }
}
